<!DOCTYPE html>
<html>
<head>
	<title></title>
	<script type="text/javascript" src="__HOME__/js/jquery-1.6.2.min.js"></script>
</head>
<body>
<form method="post" action=""> 
	<input type="text" name="phone" id="phone">
	<input type="button" value="点击获取验证码" id="btnCode">
	<input type="text" name="yan" value="输入验证码">
</form>
<script type="text/javascript">
	$(function(){
		$("#btnCode").click(function(){
			var phone = $("#phone").val();
			// var url = "{:U('Index/phone')}"
			//ajax请求
			$.ajax({
				type: 'get',
				url: 'phone?phone='+phone,
				success: function(msg){
					if(msg==1){
						alert('短信验证码已经发送');
						// $.('#btnCode').attr('disabled','disabled');
						// getTime();
					}
				}
			})
		})
	})
</script>
</body>
</html>